#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPropertyAnimation>
#include <QEasingCurve>
#include <QPushButton>

#include <QPoint>
#include <QDebug>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QApplication>
#include <QGraphicsOpacityEffect>
#include <QAbstractAnimation>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onLinearClicked();
    void onInQuadClicked();
    void onOutBounceClicked();
    void onOutElasticClicked();
    void resetAnimation();
    void onFadeInClicked();
    void onFadeOutClicked();
private:
    Ui::MainWindow *ui;
    QPropertyAnimation *animation;
    QPropertyAnimation *opacityAnimation;
    QPushButton *animatedButton;
    QGraphicsOpacityEffect *opacityEffect;//透明度动画 (新增)
    QPoint originalPos;
    qreal originalOpacity = 1.0;
};
#endif // MAINWINDOW_H
